export const tableOption = {
  border: true, //是否带有纵向边框
  selection: true, //行最前面的选择框
  menuAlign: "center",
  labelWidth: 110,//设置列名称长度
  searchSpan: 24,// 搜索项框栅列
  searchIndex: 4, //筛选收缩
  searchIcon: true,
  align: "center", //对齐方式
  emptyText: '自定义暂无数据提示语',
  column: [
    {
      label: "id",
      prop: "id",
      type: "input",
      hide: true,
      editDisabled: true,
      editDisplay: false,
      addDisplay: false
    },
    {
      label: "类型",
      prop: "type",
      type: 'select',
      dicUrl: '/admin/dict/type/app_setting_type',
      props: {
        label: 'label',
        value: 'itemValue'
      },
      formatter: (val, value, label) => {
        return `${label}(${value})`
      },
      search: true,
      searchType: "radio",
      rules: [{
        required: true,
        message: '请选择类型',
        trigger: 'blur'
      }],
      span: 24
    },
    {
      label: "名称",
      prop: "name",
      type: "input",
      span: 12,
      rules: [{
        required: true,
        message: '请输入名称',
        trigger: 'blur'
      }],
    },
    {
      label: "排序",
      prop: "sortOrder",
      type: "input",
      rules: [{
        required: true,
        message: '请输入排序',
        trigger: 'blur'
      }],
      value: 999
    },
    {
      label: "链接",
      prop: "link",
      type: "input",
      span: 12,
    },
    {
      label: "状态",
      prop: "status",
      type: 'switch',
      dicData: [{
        label: '禁用',
        value: false
      }, {
        label: '开启',
        value: true
      }],
      value: true,
      slot: true,
      rules: [{
        required: true,
        message: '请选择状态',
        trigger: 'blur'
      }],
      width: 140,
    },
    {
      label: "图标",
      prop: "icon",
      type: "upload",
      listType: 'picture-img',
      dataType: 'string',
      tip: '只能上传jpg/png文件,且不超过500kb',
      action: '/admin/sys-file/upload',
      propsHttp: {
        res: 'data'
      },
      span: 24,
    },
    {
      label: "活动开始时间",
      prop: "activityStartTime",
      type: "datetime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      span: 12
    },
    {
      label: "活动结束时间",
      prop: "activityEndTime",
      type: "datetime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      span: 12
    },
  ]
}
